home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / nn.zip / PATCH06 < prev    next >
Internet Message Format  |  1989-10-21  |  9KB

  1. From edsews!texas.dk!storm Mon Sep 11 10:48:37 1989
  2. Path: bgalli!edsews!rphroy!cfctech!sharkey!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!dkuug!tidk!storm
  3. From: storm@texas.dk (Kim F. Storm)
  4. Newsgroups: comp.sources.bugs,comp.sources.d,news.software.b
  5. Subject: NN 6.3  --  Official patch #6
  6. Keywords: nn patch
  7. Message-ID: <415@texas.dk>
  8. Date: 11 Sep 89 14:48:37 GMT
  9. Organization: Texas Instruments, Denmark
  10. Lines: 365
  11.  
  12. This is patch #6 for nn release 6.3.
  13.  
  14. Well, patch #5 did not keep the title as the last official patch
  15. to nn 6.3 for long.
  16.  
  17. This patch is needed with the Cnews patches from 22-Aug-89, because
  18. Cnews will now update the min field in a different way than Bnews:
  19.  
  20.     When the group is empty, the min field will be one greater
  21.     than the last article field.
  22.  
  23. Thanks to Wayne Davidson for the necessary fix (he also provided the
  24. necessary patches to Cnews which are included in the 22-Aug-89 patches).
  25.  
  26. Cnews also has a different date format than Bnews which may lead to
  27. improperly sorted menus.  Thanks to P{r Emanuelsson for recognizing
  28. this.  However, time zones are still not recognized in dates, so the
  29. ordering may still be slightly wrong.
  30.  
  31. This patch also fixes a few other problems in nnadmin.
  32.  
  33. A few patches needed for 286 support are also included.  These have
  34. previously been circulated on the net as unofficial patches (from 
  35. Wietse Z. Venema).
  36.  
  37. And finally: The missing check for the buffer overrun in pack_date.c
  38. is fixed.  Thank you to all those who went through the efforts to
  39. track this nasty problem down.
  40.  
  41.  
  42. ++Kim Storm
  43.  
  44. *** /usr/storm/nn6.3.5/patchlevel.h    Tue Aug 22 13:19:44 1989
  45. --- patchlevel.h    Fri Aug 25 13:15:33 1989
  46. ***************
  47. *** 13,19 ****
  48.    *    1989-06-30:  Patch 3: several files
  49.    *    1989-07-10:  Patch 4: several files
  50.    *    1989-08-22:  Patch 5: db.c
  51.    */
  52.   
  53. ! #define PATCHLEVEL 5
  54.   
  55. --- 13,20 ----
  56.    *    1989-06-30:  Patch 3: several files
  57.    *    1989-07-10:  Patch 4: several files
  58.    *    1989-08-22:  Patch 5: db.c
  59. +  *    1989-08-25:  Patch 6: admin.c pack_date.c pack_name.c ...
  60.    */
  61.   
  62. ! #define PATCHLEVEL 6
  63.   
  64.  
  65. *** /usr/storm/nn6.3.4/admin.c    Mon Jul 10 13:36:01 1989
  66. --- admin.c    Fri Aug 25 11:22:39 1989
  67. ***************
  68. *** 95,101 ****
  69.       
  70.       for (;;) {
  71.       switch(get_cmd(
  72. ! "\nU)pdate W)akeup M)aster G)roups L)og S)tat C)onf E)xpire I)nit V)alidate Q)uit",
  73.   "ADMIN")) {
  74.           
  75.        case 'M':
  76. --- 95,101 ----
  77.       
  78.       for (;;) {
  79.       switch(get_cmd(
  80. ! "\nC)onf E)xpire G)roups I)nit L)og M)aster Q)uit S)tat U)pdate V)alidate W)akeup",
  81.   "ADMIN")) {
  82.           
  83.        case 'M':
  84. ***************
  85. *** 190,196 ****
  86.   
  87.       for (;;) {
  88.       switch (c = get_cmd(
  89. ! "\nG)roup A)ll E)mpty N)on-empty F)iles O)ptions S)tat T)race K)ill",
  90.   "MASTER")) {
  91.   
  92.        case 'G':
  93. --- 190,196 ----
  94.   
  95.       for (;;) {
  96.       switch (c = get_cmd(
  97. ! "\nA)ll E)mpty F)iles G)roup K)ill N)on-empty O)ptions S)tat T)race",
  98.   "MASTER")) {
  99.   
  100.        case 'G':
  101. ***************
  102. *** 222,231 ****
  103.   
  104.        case 'O':
  105.           c = get_cmd("r)epeat_delay  e)xpire_level", "OPTION");
  106. !         if (c != 'r' && c != 'e') break;
  107.           value = get_entry("Option value", 1L, 10000L);
  108.           if (value < 0) break;
  109. !         send_master(c, value, 0L);
  110.           break;
  111.           
  112.        case 'S':
  113. --- 222,231 ----
  114.   
  115.        case 'O':
  116.           c = get_cmd("r)epeat_delay  e)xpire_level", "OPTION");
  117. !         if (c != 'R' && c != 'E') break;
  118.           value = get_entry("Option value", 1L, 10000L);
  119.           if (value < 0) break;
  120. !         send_master(tolower(c), value, 0L);
  121.           break;
  122.           
  123.        case 'S':
  124. ***************
  125. *** 260,266 ****
  126.    loop:
  127.   
  128.       c = get_cmd(
  129. ! "\nE)rrors R)eports C)ollect e(X)pire A)dmin G)roup (1-9)tail (*)all (@)clean",
  130.   "LOG");
  131.       
  132.       if (c < SP || c == 'Q') return;
  133. --- 260,266 ----
  134.    loop:
  135.   
  136.       c = get_cmd(
  137. ! "\n(1-9)tail A)dmin C)ollect E)rrors G)roup R)eports e(X)pire (*)all (@)clean",
  138.   "LOG");
  139.       
  140.       if (c < SP || c == 'Q') return;
  141. ***************
  142. *** 341,347 ****
  143.    
  144.       for (;;) {
  145.       switch (get_cmd(
  146. ! "\nD)ata H)eader F)iles S)et_flag C)lear_flag E)xpire R)ecollect G)roup",
  147.   "GROUP")) {
  148.        case 'D':
  149.           dump_group(gh, 0);
  150. --- 341,347 ----
  151.    
  152.       for (;;) {
  153.       switch (get_cmd(
  154. ! "\nC)lear_flag D)ata E)xpire F)iles G)roup H)eader S)et_flag R)ecollect",
  155.   "GROUP")) {
  156.        case 'D':
  157.           dump_group(gh, 0);
  158. ***************
  159. *** 930,936 ****
  160.           continue;
  161.       }
  162.       
  163. !     if (gh->first_article > gh->last_l_article ||
  164.           gh->last_l_article  > gh->last_article || 
  165.           gh->first_l_article > gh->first_article) {
  166.   
  167. --- 930,936 ----
  168.           continue;
  169.       }
  170.       
  171. !     if (gh->first_article > (gh->last_l_article + 1) ||
  172.           gh->last_l_article  > gh->last_article || 
  173.           gh->first_l_article > gh->first_article) {
  174.   
  175.  
  176. *** /usr/storm/nn6.3.0/pack_date.c    Thu Jun  1 11:11:00 1989
  177. --- pack_date.c    Mon Jul 17 21:10:04 1989
  178. ***************
  179. *** 10,16 ****
  180.    *    The result is NOT a time_t value, i.e. ctime() will
  181.    *    not produce the original Date string.
  182.    *
  183. !  *    The date must have format:  [D]D Mmm YY hh:mm:ss GMT
  184.    */
  185.   
  186.   pack_date(destp, date)
  187. --- 10,16 ----
  188.    *    The result is NOT a time_t value, i.e. ctime() will
  189.    *    not produce the original Date string.
  190.    *
  191. !  *    The date must have format:  [...,] [D]D Mmm YY hh:mm:ss GMT
  192.    */
  193.   
  194.   pack_date(destp, date)
  195. ***************
  196. *** 17,42 ****
  197.   time_stamp *destp;
  198.   char *date;
  199.   {
  200. !     time_stamp res;
  201.       register int min, hour, day, mon, year;
  202.       *destp = 0;
  203.       if (date == NULL) return;
  204.       
  205.       if ((day = next_int(&date)) == 0) return;
  206.       
  207. !     switch (*date) {
  208.        case 'J':
  209. !     if (date[1] == 'a') { mon = 0; break; }
  210. !     if (date[2] == 'n') { mon = 5; break; }
  211.       mon = 6; break;
  212.        case 'F':
  213.       mon = 1; break;
  214.        case 'M':
  215. !     if (date[2] == 'r') { mon = 2; break; }
  216.       mon = 4; break;
  217.        case 'A':
  218. !     if (date[1] == 'p') { mon = 3; break; }
  219.       mon = 7; break;
  220.        case 'S':
  221.       mon = 8; break;
  222. --- 17,44 ----
  223.   time_stamp *destp;
  224.   char *date;
  225.   {
  226. !     register time_stamp res;
  227.       register int min, hour, day, mon, year;
  228. !     
  229.       *destp = 0;
  230.       if (date == NULL) return;
  231.       
  232.       if ((day = next_int(&date)) == 0) return;
  233. +     while (*date && isspace(*date)) date++;
  234.       
  235. !     switch (*date++) {
  236.        case 'J':
  237. !     if (*date++ == 'a') { mon = 0; break; }
  238. !     if (*date++ == 'n') { mon = 5; break; }
  239.       mon = 6; break;
  240.        case 'F':
  241.       mon = 1; break;
  242.        case 'M':
  243. !     if (*++date == 'r') { mon = 2; break; }
  244.       mon = 4; break;
  245.        case 'A':
  246. !     if (*date++ == 'p') { mon = 3; break; }
  247.       mon = 7; break;
  248.        case 'S':
  249.       mon = 8; break;
  250. ***************
  251. *** 50,57 ****
  252.       return;
  253.       }
  254.       
  255. -     date += 4;
  256. -     
  257.       year = next_int(&date);
  258.       hour = next_int(&date);
  259.       min = next_int(&date);
  260. --- 52,57 ----
  261. ***************
  262. *** 72,84 ****
  263.   {
  264.       register char *str = *dp;
  265.       register i;
  266.       
  267.       i = 0;
  268.       while (*str && isdigit(*str))
  269.       i = (i * 10) + *str++ - '0';
  270.       
  271. -     while (*str && (isspace(*str) || *str == ':')) str++;
  272.       *dp = str;
  273.       return i;
  274.   }
  275. --- 72,84 ----
  276.   {
  277.       register char *str = *dp;
  278.       register i;
  279. +     while (*str && !isdigit(*str)) str++;
  280.       
  281.       i = 0;
  282.       while (*str && isdigit(*str))
  283.       i = (i * 10) + *str++ - '0';
  284.       
  285.       *dp = str;
  286.       return i;
  287.   }
  288. *** /usr/storm/nn6.3.0/pack_name.c    Thu Jun  1 11:11:00 1989
  289. --- pack_name.c    Mon Sep 11 12:37:16 1989
  290. ***************
  291. *** 183,188 ****
  292. --- 183,189 ----
  293.       return 0;
  294.   
  295.       p = source, q = namebuf, n = 0;
  296. +     maxq = namebuf + sizeof namebuf - 1;
  297.       
  298.   new_partition:
  299.       for (i = SEP_MAXIMUM; --i >= 0; separator[i] = NULL);
  300. ***************
  301. *** 211,216 ****
  302. --- 212,218 ----
  303.           continue;
  304.       }
  305.       if (n > 1) continue;
  306. +     if (q >= maxq) break;
  307.       *q++ = c;
  308.       if (IS_SEPARATOR(c)) {
  309.           switch (sep = (Class[c] & 0xff)) {
  310. *** ./sequence.c-    Tue Jul 11 21:38:23 1989
  311. --- ./sequence.c    Tue Jul 11 22:13:10 1989
  312. ***************
  313. *** 363,369 ****
  314.   
  315.   static faked_entry(name, flag)
  316.   char *name;
  317. ! int flag;
  318.   {
  319.       group_header *gh;
  320.       
  321. --- 363,369 ----
  322.   
  323.   static faked_entry(name, flag)
  324.   char *name;
  325. ! int32 flag;
  326.   {
  327.       group_header *gh;
  328.       
  329. *** ./rc.c-    Tue Jul 11 21:38:16 1989
  330. --- ./rc.c    Tue Jul 11 22:13:09 1989
  331. ***************
  332. *** 443,449 ****
  333.       gh->group_flag &= ~G_UNREAD_COUNT;
  334.       }    
  335.       
  336. !     return was_unread;
  337.   }
  338.   
  339.   
  340. --- 443,449 ----
  341.       gh->group_flag &= ~G_UNREAD_COUNT;
  342.       }    
  343.       
  344. !     return (was_unread != 0);
  345.   }
  346.   
  347.   
  348. *** ./articles.c-    Tue Jul 11 21:36:58 1989
  349. --- ./articles.c    Tue Jul 11 22:36:27 1989
  350. ***************
  351. *** 225,231 ****
  352.           max_articles += NEXT_ART_ARRAY_SIZE;
  353.       }
  354.       art_array = (article_header **)
  355. !         calloc(max_articles, sizeof(article_header **));
  356.       mem_check((char *)art_array, (int)max_articles, "article headers");
  357.       while (--n >= 0) art_array[n] = *--articles;
  358.       articles = art_array + mem_offset;
  359. --- 225,231 ----
  360.           max_articles += NEXT_ART_ARRAY_SIZE;
  361.       }
  362.       art_array = (article_header **)
  363. !         calloc((unsigned)max_articles, sizeof(article_header **));
  364.       mem_check((char *)art_array, (int)max_articles, "article headers");
  365.       while (--n >= 0) art_array[n] = *--articles;
  366.       articles = art_array + mem_offset;
  367.  
  368.  
  369. -- 
  370. Kim F. Storm        storm@texas.dk        Tel +45 429 174 00
  371. Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
  372.       No news is good news, but nn is better!
  373.  
  374.  
  375.